<template>
  <br />
  <z-mentions v-model:value="value" autofocus @select="onSelect">
    <z-mentions-option value="afc163">afc163</z-mentions-option>
    <z-mentions-option value="zombieJ">zombieJ</z-mentions-option>
    <z-mentions-option value="yesmeck">yesmeck</z-mentions-option>
  </z-mentions>
</template>
<script>
import { defineComponent, ref, watch } from 'vue'

export default defineComponent({
  setup() {
    const value = ref('@afc163')
    watch(value, () => {
      console.log('value', value)
    })
    const onSelect = option => {
      console.log('select', option)
    }
    return {
      value,
      onSelect
    }
  }
})
</script>
